<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>属性选择器</title>
</head>
<body>
    <input type="text">
    <input type="password">
    <input type="password">
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script>
    //1.属性名选择器   $("元素[属性名]")
    let inputs = $("input[type]");
    alert("input标签中有type的属性一共有："+inputs.length)
    //2.属性值选择器   $("元素[属性名=属性值]")
    let inputs2 = $("input[type=password]");
    alert("input标签中有type的属性等于password一共有："+inputs2.length)

</script>
</html>